const button = document.getElementById('btn');

button.addEventListener('click',() => {
  // 此处的electronAPI即为预加载中传递的命名空间，sendMainInfo为传递过来的回调函数
  console.log('click');
  
  const name = document.getElementById('name').value;
  electronAPI.sendMainInfo(name);
})
